import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/user/info',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

export function getUserList() {
  return request({
    url: '/user/getUserList',
    method: 'post'
  })
}

export function getUserOrder(data) {
  return request({
    url: '/user/getUserOrder',
    method: 'post',
    data
  })
}

export function setBannerImage(data) {
  return request({
    url: '/user/setBannerImage',
    method: 'post',
    data
  })
}

export function goodsList() {
  return request({
    url: '/goods/list',
    method: 'post'
  })
}

export function addGoods(data) {
  return request({
    url: '/goods/add',
    method: 'post',
    data
  })
}

export function delGoods(data) {
  return request({
    url: '/goods/del',
    method: 'post',
    data
  })
}
